package zuoye50;

import java.util.Scanner;

public class Homework05 {
   public static void main(String[] args) {
      Scanner sc= new Scanner(System.in);
      int n=sc.nextInt();
      char G=(n>=90)?'A':((n>=60)?'B':'C') ;
      System.out.println(G);
   }
}
